-
Notifications
You must be signed in to change notification settings - Fork 13.6k
GCC backend subtree update #144893
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GCC backend subtree update #144893
Conversation
Most uses of it either contain a fat or thin lto module. Only WorkItem::LTO could contain both, but splitting that enum variant doesn't complicate things much.
…custom default data address space
…ilee Allow custom default address spaces and parse `p-` specifications in the datalayout string Some targets, such as CHERI, use as default an address space different from the "normal" default address space `0` (in the case of CHERI, [200 is used](https://www.cl.cam.ac.uk/techreports/UCAM-CL-TR-877.pdf)). Currently, `rustc` does not allow to specify custom address spaces and does not take into consideration [`p-` specifications in the datalayout string](https://llvm.org/docs/LangRef.html#langref-datalayout). This patch tries to mitigate these problems by allowing targets to define a custom default address space (while keeping the default value to address space `0`) and adding the code to parse the `p-` specifications in `rustc_abi`. The main changes are that `TargetDataLayout` now uses functions to refer to pointer-related informations, instead of having specific fields for the size and alignment of pointers in the default address space; furthermore, the two `pointer_size` and `pointer_align` fields in `TargetDataLayout` are replaced with an `FxHashMap` that holds info for all the possible address spaces, as parsed by the `p-` specifications. The potential performance drawbacks of not having ad-hoc fields for the default address space will be tested in this PR's CI run. r? workingjubilee
…iaskrgr Rollup of 9 pull requests Successful merges: - rust-lang#132469 (Do not suggest borrow that is already there in fully-qualified call) - rust-lang#143340 (awhile -> a while where appropriate) - rust-lang#143438 (Fix the link in `rustdoc.md`) - rust-lang#143539 (Regression tests for repr ICEs) - rust-lang#143566 (Fix `x86_64-unknown-netbsd` platform support page) - rust-lang#143572 (Remove unused allow attrs) - rust-lang#143583 (`loop_match`: fix 'no terminator on block') - rust-lang#143584 (make `Machine::load_mir` infallible) - rust-lang#143591 (Fix missing words in future tracking issue) r? `@ghost` `@rustbot` modify labels: rollup
Remove support for dynamic allocas Followup to rust-lang#141811
…rrors Various refactors to the LTO handling code In particular reducing the sharing of code paths between fat and thin-LTO and making the fat LTO implementation more self-contained. This also moves some autodiff handling out of cg_ssa into cg_llvm given that Enzyme only works with LLVM anyway and an implementation for another backend may do things entirely differently. This will also make it a bit easier to split LTO handling out of the coordinator thread main loop into a separate loop, which should reduce the complexity of the coordinator thread.
…compiler-errors fix `-Zsanitizer=kcfi` on `#[naked]` functions fixes rust-lang#143266 With `-Zsanitizer=kcfi`, indirect calls happen via generated intermediate shim that forwards the call. The generated shim preserves the attributes of the original, including `#[unsafe(naked)]`. The shim is not a naked function though, and violates its invariants (like having a body that consists of a single `naked_asm!` call). My fix here is to match on the `InstanceKind`, and only use `codegen_naked_asm` when the instance is not a `ReifyShim`. That does beg the question whether there are other `InstanceKind`s that could come up. As far as I can tell the answer is no: calling via `dyn` seems to work find, and `#[track_caller]` is disallowed in combination with `#[naked]`. r? codegen ````@rustbot```` label +A-naked cc ````@maurer```` ````@rcvalle````
…update_cg_gcc_2025-07-18
The modules vec can already contain serialized modules and there is no need to distinguish between cached and non-cached cgus at LTO time.
And move exported_symbols_for_lto call from backends to cg_ssa.
…7_21 Sync from rust 2025/07/21
…8_03 Sync from rust 2025/08/03
…update_cg_gcc_2025-08-04
rustbot has assigned @petrochenkov. Use |
Some changes occurred in compiler/rustc_codegen_gcc |
Forgot to assign ghost, sorry about that. r? ghost |
@bors r+ p=1 rollup=never |
☀️ Test successful - checks-actions |
What is this?This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.Comparing e1b9081 (parent) -> 0060d5a (this PR) Test differencesShow 3 test diffs3 doctest diffs were found. These are ignored, as they are noisy. Test dashboardRun cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard 0060d5a2a8a86a31f6299311fe64b1d755a91c4f --output-dir test-dashboard And then open Job duration changes
How to interpret the job duration changes?Job durations can vary a lot, based on the actual runner instance |
Finished benchmarking commit (0060d5a): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)Results (secondary -0.7%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 468.82s -> 466.337s (-0.53%) |
cc @antoyo